8 txs
4 calls
constructor
constructor(address _wbtc, address _strbtc, address _withdrawer)
functions
currentlyMinted
viewfunction currentlyMinted() view returns (uint256)
incomingRateDenominator
viewfunction incomingRateDenominator() view returns (uint256)
incomingRateNumerator
viewfunction incomingRateNumerator() view returns (uint256)
mintingLimit
viewfunction mintingLimit() view returns (uint256)
outgoingRateDenominator
viewfunction outgoingRateDenominator() view returns (uint256)
outgoingRateNumerator
viewfunction outgoingRateNumerator() view returns (uint256)
strbtc
viewfunction strbtc() view returns (address)
totalBurned
viewfunction totalBurned() view returns (uint256)
totalMinted
viewfunction totalMinted() view returns (uint256)
wbtc
viewfunction wbtc() view returns (address)
withdrawer
viewfunction withdrawer() view returns (address)
convertStrBTCToWBTC
nonpayablefunction convertStrBTCToWBTC(uint256 strbtcAmount) returns (uint256)
convertWBTCToStrBTC
nonpayablefunction convertWBTCToStrBTC(uint256 wbtcAmount) returns (uint256)
withdraw
nonpayablefunction withdraw(address token, address recipient, uint256 amount)
events
IncomingRateUpdated
event IncomingRateUpdated(uint256 numerator, uint256 denominator, address updater)
MintingLimitUpdated
event MintingLimitUpdated(uint256 newLimit, address updater)
OutgoingRateUpdated
event OutgoingRateUpdated(uint256 numerator, uint256 denominator, address updater)
StrBTCConverted
event StrBTCConverted(address indexed user, uint256 strbtcAmount, uint256 wbtcAmount)
WBTCConverted
event WBTCConverted(address indexed user, uint256 wbtcAmount, uint256 strbtcAmount)
errors
AmountMustBeGreaterThanZero
error AmountMustBeGreaterThanZero()
ConversionResultedInZeroTokens
error ConversionResultedInZeroTokens()
InsufficientWBTCBalance
error InsufficientWBTCBalance()
MintingLimitExceeded
error MintingLimitExceeded()
NotWithdrawer
error NotWithdrawer()
creation bytecode
0x61018060405234801561001157600080fd5b50604051610c13380380610c1383398101604081905261003091610094565b6001600160a01b0392831660a0529082166080521660c0526103e76101008190526103e86101208190526101405261016052640ba43b740060e05260008080556001556100d7565b80516001600160a01b038116811461008f57600080fd5b919050565b6000806000606084860312156100a957600080fd5b6100b284610078565b92506100c060208501610078565b91506100ce60408501610078565b90509250925092565b60805160a05160c05160e05161010051610120516101405161016051610a836101906000396000818161015901526102f201526000818161025e01526102ce015260008181610285015261062d0152600081816101ce01526106510152600081816101a701526106a501526000818161020601526108670152600081816101800152818161035b01528181610535015261072e01526000818161011a01528181610425015281816104b701526107c00152610a836000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063a2309ff81161008c578063d8bf772811610066578063d8bf772814610231578063d9caed1214610244578063ec07574f14610259578063f82427db1461028057600080fd5b8063a2309ff8146101f8578063cdc1842414610201578063d89135cd1461022857600080fd5b80633cdc5389116100c85780633cdc53891461017b57806349072f12146101a2578063847d55e7146101c95780639c800cd2146101f057600080fd5b80632b8dbfe4146100ef5780632d60aa4c14610115578063349ac2ff14610154575b600080fd5b6101026100fd36600461091e565b6102a7565b6040519081526020015b60405180910390f35b61013c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161010c565b6101027f000000000000000000000000000000000000000000000000000000000000000081565b61013c7f000000000000000000000000000000000000000000000000000000000000000081565b6101027f000000000000000000000000000000000000000000000000000000000000000081565b6101027f000000000000000000000000000000000000000000000000000000000000000081565b6101026105ef565b61010260005481565b61013c7f000000000000000000000000000000000000000000000000000000000000000081565b61010260015481565b61010261023f36600461091e565b610606565b610257610252366004610953565b61085c565b005b6101027f000000000000000000000000000000000000000000000000000000000000000081565b6101027f000000000000000000000000000000000000000000000000000000000000000081565b6000816000036102ca57604051635e85ae7360e01b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006103177f0000000000000000000000000000000000000000000000000000000000000000856109a6565b61032191906109c3565b90508060000361034457604051631b36174f60e01b815260040160405180910390fd5b6040516370a0823160e01b815230600482015281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156103aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ce91906109e5565b10156103ec5760405162f4abcd60e21b815260040160405180910390fd5b82600160008282546103fe91906109fe565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610476573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049a9190610a11565b506040516319ab992f60e11b8152306004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690633357325e90604401600060405180830381600087803b15801561050357600080fd5b505af1158015610517573d6000803e3d6000fd5b505060405163a9059cbb60e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063a9059cbb91506044016020604051808303816000875af1158015610588573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ac9190610a11565b50604080518481526020810183905233917f73b889c6bdd10965c1f586e892daba24073b24e95c391489c0093b30704b3d3d91015b60405180910390a292915050565b60006001546000546106019190610a3a565b905090565b60008160000361062957604051635e85ae7360e01b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006106767f0000000000000000000000000000000000000000000000000000000000000000856109a6565b61068091906109c3565b9050806000036106a357604051631b36174f60e01b815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000816106cd6105ef565b6106d791906109fe565b11156106f65760405163181c485d60e01b815260040160405180910390fd5b8060008082825461070791906109fe565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561077f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a39190610a11565b50604051632f4cfd4760e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632f4cfd4790604401600060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505060408051868152602081018590523393507ffdf398e676136e877c967166a31f32cf552c4233234dcba81760502a4c78cd0c9250016105e1565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108a557604051632d99bc8360e21b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af11580156108f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109189190610a11565b50505050565b60006020828403121561093057600080fd5b5035919050565b80356001600160a01b038116811461094e57600080fd5b919050565b60008060006060848603121561096857600080fd5b61097184610937565b925061097f60208501610937565b929592945050506040919091013590565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176109bd576109bd610990565b92915050565b6000826109e057634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156109f757600080fd5b5051919050565b808201808211156109bd576109bd610990565b600060208284031215610a2357600080fd5b81518015158114610a3357600080fd5b9392505050565b818103818111156109bd576109bd61099056fea26469706673582212209cd210cb0233776f8e77c47efc105dc963cd4cea9d69603f645a5a02edca91ad64736f6c634300081b00330000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000b2723d5df98689eca6a4e7321121662ddb9b301700000000000000000000000022bc85c483103950441eaab8312be9f07e234634