Wrapping and Unwrapping
Why wrap?
Wrapper choices
Wrapping via avatar.wrap
avatar.wrapDemurraged ERC‑20
import { Sdk } from '@aboutcircles/sdk';
import { CirclesType } from '@aboutcircles/sdk-types';
const sdk = new Sdk();
const avatar = await sdk.getAvatar('0xYourAvatar');
const wrapAmount = BigInt('1000000000000000000'); // 1 CRC
const receipt = await avatar.wrap.asDemurraged(avatar.address, wrapAmount);
// Wrapper address
const demurragedWrapper = await sdk.core.liftERC20.erc20Circles(
CirclesType.Demurrage,
avatar.address
);Inflationary/static ERC‑20
Unwrapping back to ERC‑1155
Demurraged unwrapping
Static wrapper unwrapping
Note:
Last updated
Was this helpful?