Skip to Content

Developer Guide

Build on PicWe’s RWA infrastructure


Overview

PicWe provides a comprehensive smart contract infrastructure for RWA capital markets. This guide helps developers integrate with our platform.


Quick Start

1. Choose Your Network

NetworkChain ID
BSC Mainnet56
Base Mainnet8453
Arbitrum One42161
HashKey Chain177
Plume Chain98865
Movement

2. Get Contract Addresses

See Contract Addresses for all deployed contracts.

3. Review API Reference

See API Reference for function signatures and parameters.


Core Contracts

WEUSD System

ContractPurpose
WEUSDERC-20 stablecoin token
MintRedeemMint/redeem WEUSD with USDC
CrossChainCross-chain transfer operations

RWA Platform

ContractPurpose
RWALaunchpadFactory for creating IRO/Market pairs
GenesisLaunchAuction (GLA)IRO subscription management
MarketOrigin Mincast operations (mincast/melt)

Invest Module

ContractPurpose
InvestmentManagerInvestment lifecycle management
InvestmentPoolInvestment fund custody
RedemptionPoolRedemption fund custody
AssetRegistryAsset configuration storage
SystemParametersGlobal parameters

Integration Examples

Minting WEUSD

// 1. Approve USDC spending IERC20(usdcAddress).approve(mintRedeemAddress, amount); // 2. Mint WEUSD IMintRedeem(mintRedeemAddress).mint(amount);

Mincasting RWA Tokens

// 1. Approve WEUSD spending IERC20(weusdAddress).approve(marketAddress, amount); // 2. Mincast tokens (uint256 tokens, uint256 fee) = IMarket(marketAddress).mincast( weusdAddress, // token amount, // tokenWorth minExpected // desired (slippage protection) );

Participating in IRO

// 1. Approve WEUSD spending IERC20(weusdAddress).approve(glaAddress, amount); // 2. Subscribe (during public phase) IGLA(glaAddress).publicOfferingBuy(amount); // 3. Claim tokens (after market initialization) IGLA(glaAddress).claim();

Investing via Module

// 1. Approve WEUSD to InvestmentPool IERC20(weusdAddress).approve(investmentPoolAddress, amount); // 2. Invest uint256 investmentId = IInvestmentManager(managerAddress).invest( assetId, amount ); // 3. Redeem at maturity uint256 profit = IInvestmentManager(managerAddress).redeem(investmentId);

Web3 Libraries

LibraryLanguageLink
ethers.jsJavaScript/TypeScriptethers.org
viemTypeScriptviem.sh
web3.pyPythonweb3py.readthedocs.io

Development Frameworks

FrameworkPurpose
HardhatDevelopment & testing
FoundryFast compilation & testing
RemixQuick prototyping

Token Decimals

Important decimal information:

TokenDecimals
WEUSD6
USDC (BSC)18
USDC (Base/Arb)6
RWA Tokens18

Always check decimals before calculations!


Best Practices

1. Always Approve First

Token transfers require prior approval:

token.approve(spender, amount);

2. Use Slippage Protection

For mincast/melt operations, set desired parameter:

// Set to 99% of expected (1% slippage tolerance) uint256 desired = expectedAmount * 99 / 100;

3. Check Contract States

Verify conditions before transactions:

  • Market initialized?
  • Contract paused?
  • User whitelisted?

4. Handle Reverts

Common revert reasons:

  • Insufficient balance
  • Approval not granted
  • Slippage exceeded
  • Market not active

Resources


Support

Need help?

  • Check FAQ
  • Contact Support
  • Join our developer Discord
Last updated on