Skip to content

Commit

Permalink
feat : Integrate Virtual Fun (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunspirit99 authored Dec 12, 2024
1 parent ddeff0d commit 207b483
Show file tree
Hide file tree
Showing 16 changed files with 3,339 additions and 0 deletions.
42 changes: 42 additions & 0 deletions pkg/liquidity-source/virtual-fun/abis.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package virtualfun

import (
"bytes"

"github.com/ethereum/go-ethereum/accounts/abi"
)

var (
erc20ABI abi.ABI
pairABI abi.ABI
factoryABI abi.ABI
bondingABI abi.ABI
)

func init() {
builder := []struct {
ABI *abi.ABI
data []byte
}{
{
&erc20ABI, erc20ABIJson,
},
{
&pairABI, pairABIJson,
},
{
&factoryABI, factoryABIJson,
},
{
&bondingABI, bodingABIJson,
},
}

for _, b := range builder {
var err error
*b.ABI, err = abi.JSON(bytes.NewReader(b.data))
if err != nil {
panic(err)
}
}
}
Loading

0 comments on commit 207b483

Please sign in to comment.