This Truffle box comes with everything you need to deploy your own Snowflake Resolver.
Snowflake is an on-chain identity framework built on ERC-1484 offering powerful tools to developers building dApps on top of it. The docs for Snowflake are available on GitBook.
SnowflakeResolver
is a contract which all Resolvers must inherit from; it ensures that Resolvers are compatible with the Snowflake smart contract. It's essentially a parent class that defines a few helpful variables and functions!
The easiest way is to override the setSnowflakeAddress
function of SnowflakeResolver
. This allows you to declare variables such as SnowflakeInterface snowflake;
and initialize them like so snowflake = SnowflakeInterface(snowflakeAddress);
Assuming you have the proper allowance, call snowflake.transferSnowflakeBalanceFrom(einFrom, einTo, amount)
. To use a via, simply call snowflake.transferSnowflakeBalanceFromVia(einFrom, via, einTo, amount)
.
Assuming you have the proper allowance, call snowflake.withdrawSnowflakeBalanceFrom(einFrom, to, amount)
. To use a via, simply call snowflake.withdrawSnowflakeBalanceFromVia(einFrom, via, einTo, amount)
.
First, ensure that you have properly escrowed funds using withdrawSnowflakeBalanceFrom
. Then, call snowflake.transferHydroBalanceTo(to, amount)
or snowflake.transferHydroBalanceToVia(to, via, amount, _bytes)
.
First, ensure that you have properly escrowed funds using withdrawSnowflakeBalanceFrom
. Then, call snowflake.withdrawHydroBalanceTo(to, amount)
or snowflake.withdrawHydroBalanceToVia(to, via, amount, _bytes)
.
Simply use hex""
to pass an empty argument.