Skip to content

Commit

Permalink
update contract abi and event name
Browse files Browse the repository at this point in the history
  • Loading branch information
shkangr committed Mar 12, 2024
1 parent b0818cf commit 853f587
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 92 deletions.
108 changes: 17 additions & 91 deletions bridge/src/bsc-bridge-contract-abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ export const bscBridgeContractAbi: ContractInterface = [
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint8",
name: "version",
type: "uint8",
},
{ indexed: false, internalType: "uint8", name: "version", type: "uint8" },
],
name: "Initialized",
type: "event",
Expand All @@ -23,12 +18,7 @@ export const bscBridgeContractAbi: ContractInterface = [
name: "_from",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "_to",
type: "address",
},
{ indexed: true, internalType: "address", name: "_to", type: "address" },
],
name: "OperatorChanged",
type: "event",
Expand All @@ -48,69 +38,43 @@ export const bscBridgeContractAbi: ContractInterface = [
name: "_amount",
type: "uint256",
},
{
indexed: false,
internalType: "bytes32",
name: "_to",
type: "bytes32",
},
{ indexed: false, internalType: "bytes32", name: "_to", type: "bytes32" },
],
name: "SendToLibPlanet",
name: "SentToLibPlanet",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_to",
type: "address",
},
{ indexed: true, internalType: "address", name: "_to", type: "address" },
{
indexed: false,
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "TransferAssetByOperator",
name: "TransferredAssetByOperator",
type: "event",
},
{
inputs: [],
name: "OPERATOR",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "TRANSFER_TOKEN",
outputs: [
{
internalType: "contract IERC20Upgradeable",
name: "",
type: "address",
},
{ internalType: "contract IERC20Upgradeable", name: "", type: "address" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "to",
type: "address",
},
],
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "changeOperator",
outputs: [],
stateMutability: "nonpayable",
Expand All @@ -123,11 +87,7 @@ export const bscBridgeContractAbi: ContractInterface = [
name: "_transferToken",
type: "address",
},
{
internalType: "address",
name: "_operator",
type: "address",
},
{ internalType: "address", name: "_operator", type: "address" },
],
name: "initialize",
outputs: [],
Expand All @@ -136,16 +96,8 @@ export const bscBridgeContractAbi: ContractInterface = [
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "bytes32",
name: "to",
type: "bytes32",
},
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "bytes32", name: "to", type: "bytes32" },
],
name: "sendToLibPlanet",
outputs: [],
Expand All @@ -155,50 +107,24 @@ export const bscBridgeContractAbi: ContractInterface = [
{
inputs: [],
name: "totalTransferAmount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "address",
name: "to",
type: "address",
},
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "address", name: "to", type: "address" },
],
name: "transferAssetByOperator",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address",
},
],
inputs: [{ internalType: "address", name: "_user", type: "address" }],
name: "transferredTokenBalance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
Expand Down
2 changes: 1 addition & 1 deletion bridge/src/monitors/bsc-burn-event-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class BscBurnEventMonitor extends TriggerableMonitor<EventData> {
}

protected async getEvents(blockIndex: number) {
const BURN_EVENT_SIG = "SendToLibPlanet(address,uint256,bytes32)";
const BURN_EVENT_SIG = "SentToLibPlanet(address,uint256,bytes32)";

const filter = {
address: this._contractDescription.address,
Expand Down

0 comments on commit 853f587

Please sign in to comment.