Skip to content

Commit

Permalink
Merge pull request #373 from multiversx/new-contracts-2024.11.06
Browse files Browse the repository at this point in the history
Integrated new contracts
  • Loading branch information
iulianpascalau authored Nov 7, 2024
2 parents ca34306 + 53b3b87 commit 78b4646
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func (handler *MultiversxHandler) DeployAndSetContracts(ctx context.Context) {

handler.wireMultiTransfer(ctx)
handler.wireSCProxy(ctx)
handler.wireWrapper(ctx)
handler.wireSafe(ctx)

handler.changeOwners(ctx)
Expand Down Expand Up @@ -325,22 +324,6 @@ func (handler *MultiversxHandler) wireSCProxy(ctx context.Context) {
log.Info("Set in SC proxy contract the safe contract", "transaction hash", hash, "status", txResult.Status)
}

func (handler *MultiversxHandler) wireWrapper(ctx context.Context) {
// setEsdtSafeOnWrapper
hash, txResult := handler.ChainSimulator.ScCall(
ctx,
handler.OwnerKeys.MvxSk,
handler.WrapperAddress,
zeroStringValue,
setCallsGasLimit,
setEsdtSafeOnWrapperFunction,
[]string{
handler.SafeAddress.Hex(),
},
)
log.Info("Set in wrapper contract the safe contract", "transaction hash", hash, "status", txResult.Status)
}

func (handler *MultiversxHandler) wireSafe(ctx context.Context) {
// setBridgedTokensWrapperAddress
hash, txResult := handler.ChainSimulator.ScCall(
Expand Down Expand Up @@ -981,6 +964,7 @@ func (handler *MultiversxHandler) unwrapCreateTransaction(ctx context.Context, t
hex.EncodeToString(value.Bytes()),
hex.EncodeToString([]byte(unwrapTokenCreateTransactionFunction)),
hex.EncodeToString([]byte(token.MvxChainSpecificToken)),
hex.EncodeToString(handler.SafeAddress.Bytes()),
hex.EncodeToString(handler.TestKeys.EthAddress.Bytes()),
}
dataField := strings.Join(params, "@")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,26 +168,17 @@
"name": "requested_token",
"type": "TokenIdentifier"
},
{
"name": "safe_address",
"type": "Address"
},
{
"name": "to",
"type": "EthAddress"
}
],
"outputs": []
},
{
"name": "setEsdtSafeContractAddress",
"onlyOwner": true,
"mutability": "mutable",
"inputs": [
{
"name": "opt_new_address",
"type": "optional<Address>",
"multi_arg": true
}
],
"outputs": []
},
{
"name": "getUniversalBridgedTokenIds",
"mutability": "readonly",
Expand Down Expand Up @@ -245,16 +236,6 @@
}
]
},
{
"name": "getEsdtSafeContractAddress",
"mutability": "readonly",
"inputs": [],
"outputs": [
{
"type": "Address"
}
]
},
{
"name": "pause",
"onlyOwner": true,
Expand Down
Binary file not shown.

0 comments on commit 78b4646

Please sign in to comment.