Skip to content
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
412 commits
Select commit Hold shift + click to select a range
2496925
test: refactor TestTransactionToGuestModuleDeployAndCall with v3 payload
shunkakinoki Mar 5, 2025
079c479
fix eoa signature representation
attente Mar 6, 2025
5d451b1
v3: use digest as subdigest
attente Mar 6, 2025
7deeddd
v3: fix meta-transaction ids
attente Mar 6, 2025
5fd5aa6
Revert "fix eoa signature representation"
attente Mar 6, 2025
6747b7b
v3: fix guest module call
attente Mar 7, 2025
b63be04
v3: use self bit
attente Mar 7, 2025
7f043de
v3: add GitHub workflow to trigger private V3 workflow
shunkakinoki Mar 7, 2025
788de31
fix eoa signature representation
attente Mar 6, 2025
7dd6a3c
v3: improve signature parsing for `WalletConfigTreeAddressLeaf`
shunkakinoki Mar 7, 2025
0514111
v3: add EIP-155 chain ID signature parsing comment
shunkakinoki Mar 7, 2025
3780334
v3: update wallet signature recovery with subdigest calculation
shunkakinoki Mar 8, 2025
77a44f2
v3: simplify wallet signature recovery test error handling
shunkakinoki Mar 8, 2025
65c9d0f
v3: payload refactor
attente Mar 18, 2025
e9f5bad
v3: publish CallsPayload
attente Mar 19, 2025
bcd8183
v3: rename
attente Mar 19, 2025
3422046
v3: publish CallsPayload.{Calls,Space,Nonce}
attente Mar 19, 2025
81835ff
Revamp Payload Codec for Foundry Testing
shunkakinoki Mar 20, 2025
e632a07
TODO: i don't know if this is correct
attente Mar 20, 2025
6ed7190
disable space and nonce checks
attente Mar 20, 2025
af0ee2c
Revert "disable space and nonce checks"
attente Mar 20, 2025
073a51e
Refactor payload structure and function names
shunkakinoki Mar 20, 2025
fbfc6a2
Update to use ConstructCallsPayload for encoding
shunkakinoki Mar 20, 2025
ad9f66e
sequence-v3@29b71b9 artifacts
attente Mar 24, 2025
e23757c
contracts: pnpm generate
attente Mar 24, 2025
edea485
Align v3 sessions
ScreamingHawk Mar 23, 2025
de9e62c
Add ComputeMetaTxnIDFromCallsPayload func
shunkakinoki Mar 26, 2025
82d42b1
Merge remote-tracking branch 'origin/master' into v3-core
shunkakinoki Mar 26, 2025
03f29fa
Update go.work.sum to remove outdated module versions and add golang.…
shunkakinoki Mar 26, 2025
e0576c7
Update GitHub Actions workflow to allow continuation on error for pri…
shunkakinoki Mar 26, 2025
8543999
Rename V3CallSuccess to V3CallSucceeded for consistency in event hand…
shunkakinoki Mar 26, 2025
405baaa
Update wallet_test.go and session_test.go with new expected values fo…
shunkakinoki Mar 26, 2025
ec3f3c3
Refactor session permissions and permission parsing to return errors …
shunkakinoki Mar 26, 2025
0f84035
Refactor TestTransactionToGuestModuleDeployAndCall to compute metaTxn…
shunkakinoki Mar 26, 2025
d523c31
fix warnings
attente Mar 26, 2025
e5a1572
rename
attente Mar 26, 2025
f2682ea
fix filename
attente Mar 26, 2025
9b50d5d
go mod tidy
attente Mar 26, 2025
9b68392
core/v3: v3 -> v3_test
attente Mar 26, 2025
fdaafd2
core: TestDigestPayloadMatchesMessagePayload
attente Mar 26, 2025
682d8fd
Enhance DecodeExecdata to support V3 execute and selfExecute methods,…
shunkakinoki Mar 26, 2025
ad0bf4c
Merge remote-tracking branch 'refs/remotes/origin/v3-core' into v3-core
shunkakinoki Mar 26, 2025
58ba47c
manually compute digest payload eip-712 digest
attente Mar 26, 2025
21c34ae
Refactor TryDecodeCalldata to include wallet address and chain ID in …
shunkakinoki Mar 27, 2025
1cf0cd1
Remove unused import and enhance TestTxnDecodeExecdata txn.
shunkakinoki Mar 27, 2025
e5e2959
DecodeExecdata: also decode guest module calls
attente Mar 27, 2025
04cf2d6
feat: ini intent config (#202)
shunkakinoki Mar 27, 2025
8b99fae
skip data size
attente Mar 27, 2025
0a84034
use only first 20 bytes for address
attente Mar 27, 2025
d8eba1c
fix TestTxnDecodeExecdata
attente Mar 27, 2025
4f2ada4
go fmt ./...
attente Mar 27, 2025
be3ca86
DecodeExecdata: fix
attente Mar 27, 2025
ca42f2c
catch CallSkipped
attente Mar 27, 2025
91dd23a
fail on trailing bytes in call payload
attente Mar 27, 2025
6d171ff
SignedTransactions.Payload
attente Mar 27, 2025
cb92a9c
SignedTransactions.ExecuteV3
attente Mar 27, 2025
bedffeb
graceful fail if cannot unpack revert
attente Mar 31, 2025
53b2de0
sequence-v3@5d79c64 artifacts
attente Apr 1, 2025
b49a2e9
update context
attente Apr 1, 2025
c57ad4f
fix test
attente Apr 1, 2025
51e6181
Implement minimum gas limit for transaction estimates
shunkakinoki Apr 2, 2025
8337909
feat: refactor gas estimate call (#244)
shunkakinoki Apr 2, 2025
36a58d8
simulator
attente Apr 2, 2025
c376d56
fix simulator
attente Apr 2, 2025
9a4155e
stop computing gas limits in estimator
attente Apr 3, 2025
71cd5bd
Bump to `64c194b`
shunkakinoki Apr 7, 2025
e0c89d4
Adding optional checkpointer field for create new config
shunkakinoki Apr 7, 2025
3a9d7ec
Add checkpointer into WalletConfig decoding
shunkakinoki Apr 7, 2025
fa38550
Add checkpointer support in signature encoding and command parameters
shunkakinoki Apr 7, 2025
f6a1708
Refactor checkpointer condition in signature writing to use Checkpoin…
shunkakinoki Apr 7, 2025
27e6bed
Update sequenceContextV3 addresses in network.go and testutil/helpers.go
shunkakinoki Apr 7, 2025
8954131
Refactor checkpointer condition in signature writing to include Check…
shunkakinoki Apr 7, 2025
c1767f9
Update wallet test assertions and improve signature validation condit…
shunkakinoki Apr 7, 2025
56a5e66
Disable checkpointer in signature validation for server cmd
shunkakinoki Apr 7, 2025
2b0068c
fix TestTransactionToGuestModuleBasic
attente Apr 7, 2025
c81f7ae
fix TestWalletDeploy
attente Apr 7, 2025
31970dd
Add tests for intent configuration with single and multiple operations
shunkakinoki Apr 9, 2025
89e5550
fix chained signature detection
attente Apr 9, 2025
efa1615
ignoreCheckpointer
attente Apr 9, 2025
a4343e8
omit checkpointer on last subsignature in chained signature
attente Apr 9, 2025
d7a1bcf
fixup! omit checkpointer on last subsignature in chained signature
attente Apr 10, 2025
f8b0c7a
fixup! omit checkpointer on last subsignature in chained signature
attente Apr 10, 2025
770e974
recursively derive checkpointer
attente Apr 10, 2025
2add8d8
Add tests for creating intent calls payload and verify digest hash
shunkakinoki Apr 11, 2025
fb89724
Update wallet addresses in network and test utility files for V3 cont…
shunkakinoki Apr 11, 2025
3f687a8
Update test assertions with new wallet and factory addresses for V3 c…
shunkakinoki Apr 11, 2025
368d451
Add ChainID, Space, Nonce, and Calls methods to IntentOperation for b…
shunkakinoki Apr 16, 2025
7b8c3ef
ConfigUpdatePayload.ImageHash()
attente Apr 22, 2025
8b1453f
checkpoint: uint32 -> uint64
attente Apr 22, 2025
01f00d4
Revert "Update wallet addresses in network and test utility files for…
shunkakinoki Apr 23, 2025
6497853
Revert "Update test assertions with new wallet and factory addresses …
shunkakinoki Apr 23, 2025
b463472
WalletConfig.IsComplete()
attente Apr 23, 2025
d72cee3
ImageHash is ImageHashable
attente Apr 23, 2025
2896796
publish payload fields
attente Apr 23, 2025
6412293
generic tree
attente Apr 24, 2025
a950429
wallet-contracts-v3@6a3d05f artifacts
attente Apr 28, 2025
18b8a68
Refactor test assertions in deployer_test.go to validate wallet facto…
shunkakinoki Apr 29, 2025
2ced1c1
Update wallet addresses in network and test utility files for V3 cont…
shunkakinoki Apr 29, 2025
8a1f5ed
Update FactoryAddress in network.go and testutil/helpers.go for V3 co…
shunkakinoki Apr 29, 2025
a507f65
Update test assertions in deployer_test.go and eip2470_deployer_test.…
shunkakinoki Apr 29, 2025
dadb8c8
Update Factory.json and wallet_factory.gen.go with new bytecode and d…
shunkakinoki Apr 29, 2025
ad78608
Update Stage1Module.json and wallet_stage1.gen.go with new bytecode a…
shunkakinoki Apr 29, 2025
3b7366c
Update Guest.json and wallet_guest.gen.go with new bytecode and deplo…
shunkakinoki Apr 29, 2025
849edf5
Update wallet_test.go with new expected wallet address and signature …
shunkakinoki Apr 29, 2025
09c5af4
estimator: bump v3 estimates by 3%
attente Apr 29, 2025
e5b2d30
Deprecate intent operations and use v3.CallsPayload directly
shunkakinoki Apr 30, 2025
76a78e3
rm EncodeDecodedPayload
attente May 1, 2025
c08e429
Add real-world example test for intent configuration address
shunkakinoki May 1, 2025
73647b5
Merge remote-tracking branch 'refs/remotes/origin/v3-core' into v3-core
shunkakinoki May 1, 2025
8520cd6
Update TestIntentConfigurationAddress_RealWorldExample with new main …
shunkakinoki May 1, 2025
b22decd
Add TestIntentTransactionToGuestModuleDeployAndCallMultiple to valida…
shunkakinoki May 1, 2025
917aada
Refactor TestIntentTransactionToGuestModuleDeployAndCallMultiple for …
shunkakinoki May 2, 2025
42f6d13
Enhance GetIntentConfigurationSignature to accept target call for sig…
shunkakinoki May 2, 2025
86a3391
Revert "Enhance GetIntentConfigurationSignature to accept target call…
shunkakinoki May 2, 2025
4e286c8
Update intent configuration and test cases for improved payload handling
shunkakinoki May 2, 2025
bf7dba1
Update GuestModuleAddress in network context and contract artifacts
shunkakinoki May 2, 2025
b998992
Update test cases with new expected addresses for intent configuratio…
shunkakinoki May 2, 2025
8640c4a
Payload.ABIEncode()
attente May 2, 2025
1438144
RecoverSapientSignature
attente May 2, 2025
6810c85
require provider to recover sapient signatures
attente May 5, 2025
b98a7f5
Add HashIntentParams function and corresponding tests for intent para…
shunkakinoki May 8, 2025
0eb3dd3
Refactor IntentParams structure and update hashing logic for improved…
shunkakinoki May 8, 2025
872df49
Update intent configuration tests to match Solidity payload specifica…
shunkakinoki May 9, 2025
dc6803e
Refactor token structure to use big.Int for ChainId and update relate…
shunkakinoki May 9, 2025
76c3976
abi encode tuple
pkieltyka May 9, 2025
c5e0f13
Refactor DestinationToken structure and enhance HashIntentParams func…
shunkakinoki May 11, 2025
02d68cb
Fix typo in ABI encoding for DestinationCalls in HashIntentParams fun…
shunkakinoki May 11, 2025
6e1df7d
Update HashIntentParams function to improve ABI encoding and adjust t…
shunkakinoki May 11, 2025
c795259
Update TestHashIntentParams to modify BehaviorOnError and adjust payl…
shunkakinoki May 11, 2025
d058b4b
Enhance IntentParams structure by adding Nonce field and update HashI…
shunkakinoki May 12, 2025
7b65004
Rename CreateIntentConfiguration to CreateRawIntentConfiguration for …
shunkakinoki May 12, 2025
0e67698
Enhance GetIntentConfigurationSignature function to include auth sign…
shunkakinoki May 12, 2025
4cca261
Refactor intent configuration handling by introducing an authorizatio…
shunkakinoki May 12, 2025
34ed00f
Refactor GetIntentConfigurationSignature to return an additional sign…
shunkakinoki May 12, 2025
386c155
Refactor GetIntentConfigurationSignature to streamline signature gene…
shunkakinoki May 12, 2025
8ef8388
Add GetAnypayLifiInfoHash function and AnypayLifiInfo struct for hash…
shunkakinoki May 19, 2025
74fa20d
revert: intent configuration functions back to previous iteration
shunkakinoki May 19, 2025
7e85307
Add CreateAnypaySapientSignerTree function for wallet configuration
shunkakinoki May 19, 2025
0938693
Refactor intent configuration functions to use CreateAnyAddressSubdig…
shunkakinoki May 19, 2025
460a475
Refactor CreateIntentTree function to streamline wallet configuration…
shunkakinoki May 19, 2025
5631ccc
Add tests for intent configuration with LifiInfo support
shunkakinoki May 19, 2025
c3a4086
Update intent configuration functions to include attestation signer p…
shunkakinoki May 19, 2025
a94e311
Update tests for intent configuration with LifiInfo to include attest…
shunkakinoki May 19, 2025
7996019
Update test cases for intent configuration with LifiInfo to reflect n…
shunkakinoki May 19, 2025
fef5e8e
Add CreateAnypayLifiAttestation function for ABI-encoded signature ge…
shunkakinoki May 20, 2025
9757a2a
Enhance GetIntentConfigurationSignature to include attestation signer…
shunkakinoki May 20, 2025
938c1af
Add ecrecoverForTest helper function for address recovery in tests
shunkakinoki May 20, 2025
3721c82
Refactor AnypayLifiInfo structure and update related tests for consis…
shunkakinoki May 20, 2025
777c18b
Update AnypayLifiInfo structure to rename Amount field for clarity
shunkakinoki May 20, 2025
9cd4127
Add AnypayLiFiSapientSignerAddress variable and update signing logic
shunkakinoki May 21, 2025
f1a6b21
Update expected addresses in intent configuration tests for LifiInfo
shunkakinoki May 21, 2025
9ef0214
Refactor GetIntentConfigurationSignature to include target payload an…
shunkakinoki May 21, 2025
8f087ba
Update AnypayLifiSapientSignerLiteAddress to new address for consiste…
shunkakinoki May 21, 2025
5b6c738
Update CreateAnypayLifiAttestationLite to use a specific address for …
shunkakinoki May 21, 2025
9c9c67c
Update AnypayLifiSapientSignerLiteAddress to new address for intent c…
shunkakinoki May 21, 2025
197e582
Update CreateAnypaySapientSignerTree to use a specific address for im…
shunkakinoki May 21, 2025
d04d03b
Update intent configuration tests and logic to use dynamic attestatio…
shunkakinoki May 21, 2025
56ffbad
Add debug logging with spew for intent configuration and refactor var…
shunkakinoki May 22, 2025
338a281
Add function to replace sapient signer with node leaf in WalletConfig…
shunkakinoki May 22, 2025
9a22b1a
Refactor GetIntentConfigurationSignature to always replace sapient si…
shunkakinoki May 22, 2025
f05300e
Enhance replaceSapientSignerWithNodeInConfigTree function and update …
shunkakinoki May 22, 2025
f960403
Add debug logging to CreateAnypaySapientSignerTree and enhance signat…
shunkakinoki May 22, 2025
90cd7ad
upgrade ethkit
pkieltyka May 23, 2025
d85d299
v3 receipt decoding
attente May 26, 2025
aa63e17
extract nonce space from transaction
attente May 26, 2025
c80fe3f
nonce nil check
attente May 26, 2025
828428f
nonce nil check
attente May 26, 2025
27163a9
trim 0x prefix from meta transaction id
attente May 26, 2025
46d74cb
v3 receipts
attente May 27, 2025
53ffd4a
use execute if signature exists
attente May 27, 2025
7432bc2
populate missing v3 execute signature
attente May 27, 2025
01c3bdb
Update AnypayLifiSapientSignerLiteAddress to new address
shunkakinoki May 28, 2025
4a0e621
Update test addresses in TestIntentConfigurationAddressWithLifiInfo t…
shunkakinoki May 28, 2025
5252719
upgrade ethkit with latest go-ethereum (Pectra) (#267)
pkieltyka Jun 3, 2025
579fff3
fix branch decoding
attente Jun 15, 2025
3d16d3c
fix config update payload hashing
attente Jun 15, 2025
2d0ddd0
Rename AnypayLifiInfo to AnypayExecutionInfo and update related funct…
shunkakinoki Jun 16, 2025
5e3fd58
Merge remote-tracking branch 'refs/remotes/origin/v3-core' into v3-core
shunkakinoki Jun 16, 2025
be34f23
payload refactor
attente Jun 5, 2025
e768f84
fix TestGetIntentConfigurationSignature
attente Jun 5, 2025
73e337b
fix TestTransactionVerbose
attente Jun 5, 2025
24bc17a
ApprovalDigest
attente Jun 5, 2025
b049f8b
optional signature in SignerSignatures
attente Jun 6, 2025
a35c681
SignerSignatures2 -> SignerSignatures
attente Jun 18, 2025
0d32950
conversion fixes
attente Jun 23, 2025
e3405aa
Insert2 -> Insert
attente Jun 26, 2025
12e9f06
go fmt
attente Jun 26, 2025
9cd5c0e
v3: fix nested leaf decoding
attente Jun 27, 2025
2ae7e3a
TreeBranch -> TreeNode
attente Jun 28, 2025
dc62fd5
b -> n
attente Jun 28, 2025
0798024
rewrite TreeNode.ImageHash()
attente Jun 28, 2025
45f65ed
v3: Subtrees and MergeSubtrees
attente Jun 29, 2025
e98f8b0
v3: MergeSubtrees: also use preimage if available
attente Jun 29, 2025
95b8015
v3: IsCompleteTree
attente Jun 29, 2025
307170c
Relay-intent-config (#269)
shunkakinoki Jun 30, 2025
bc3c2bf
Relay-intent-attestation-signers (#270)
shunkakinoki Jun 30, 2025
0c5d557
Update AnypayRelaySapientSignerAddress and AnypayRelaySapientSignerLi…
shunkakinoki Jul 1, 2025
02c4925
Add ChainID method to basePayload for retrieving the chain ID
shunkakinoki Jul 1, 2025
cfd0774
Add Approval method and Digest type for ImageHash handling
shunkakinoki Jul 1, 2025
4377a20
Update AnypayRelaySapientSignerAddress and AnypayRelaySapientSignerLi…
shunkakinoki Jul 1, 2025
4a8f185
Revert "Add Approval method and Digest type for ImageHash handling"
attente Jul 3, 2025
1a3f2cb
feat: Add address overrides for Sapient signers (#271)
shunkakinoki Jul 4, 2025
f3eec3c
feat: Add CCTP V2 support in intent configuration
shunkakinoki Jul 4, 2025
acfa265
refactor: Remove unused Lite addresses from intent configuration
shunkakinoki Jul 7, 2025
b21adf4
fix: Update TrailsCCTPV2SapientSignerAddress to new address for impro…
shunkakinoki Jul 7, 2025
e1886fc
core: Payload.Address() and Payload.ChainID()
attente Jul 7, 2025
1ab88dc
test: Enhance intent configuration tests with new TrailsCCTP and Trai…
shunkakinoki Jul 8, 2025
0a208a3
fix: Update TrailsRelaySapientSignerAddress to new address for improv…
shunkakinoki Jul 8, 2025
d316ed6
fix: Update TrailsRelaySapientSignerAddress to new address for improv…
shunkakinoki Jul 8, 2025
f264c6f
Merge remote-tracking branch 'origin/master' into v3-core
shunkakinoki Jul 9, 2025
5b1b10d
fix(tests): update outdated test case in intent_config_test.go
shunkakinoki Jul 9, 2025
8b96614
contracts: wallet-contracts-v3@dee3b0d artifacts
attente Jul 8, 2025
f4694ab
core: passkeys
attente Jul 9, 2025
5bf2fa7
core: passkeys (chatgpt)
attente Jul 9, 2025
c01df8c
core: v3: passkey sapient signers
attente Jul 10, 2025
8ff9de5
core: update GetIntentConfigurationSignature to support "cctp" sapien…
shunkakinoki Jul 14, 2025
277c7e6
do not clobber client data json
attente Jul 16, 2025
a136933
feat: deprecate sapient signer and trailsExecutionInfos
shunkakinoki Jul 17, 2025
507f9ad
Merge remote-tracking branch 'origin/v3-core' into v3-core
shunkakinoki Jul 17, 2025
2216319
refactor: remove attestationSigner parameter from GetIntentConfigurat…
shunkakinoki Jul 17, 2025
dbea8f4
core: update contract addresses and test cases for wallet and intent …
shunkakinoki Jul 17, 2025
c50ff21
refactor: further simplify GetIntentConfigurationSignature calls in t…
shunkakinoki Jul 17, 2025
133b278
Merge remote-tracking branch 'origin/v3-core' into v3-core
shunkakinoki Jul 17, 2025
d35c4ab
Revert "core: update contract addresses and test cases for wallet and…
shunkakinoki Jul 18, 2025
a9cf83d
core: update contract addresses and creation code for V3
shunkakinoki Jul 18, 2025
79ddcf1
chore: update contract artifacts for wallet contracts in V3
shunkakinoki Jul 18, 2025
f66ba24
chore: update wallet contract addresses in V3 test utilities
shunkakinoki Jul 18, 2025
28a870a
contracts: pnpm gen
attente Jul 29, 2025
1b73428
tests
attente Jul 29, 2025
f99a024
Simulator is Stage2Module
attente Jul 29, 2025
eff7541
Simulator: createContract
attente Jul 30, 2025
3c22618
core: add Approval method for ImageHash to derive digest for signing
shunkakinoki Aug 1, 2025
bafdcc2
Add valueforwarder (#277)
ScreamingHawk Aug 7, 2025
d68570f
Merge branch 'master' into v3-core
VojtechVitek Aug 8, 2025
575fd90
Merge branch 'master' into v3-core
VojtechVitek Aug 8, 2025
827b7ab
Fix build after git merge
VojtechVitek Aug 8, 2025
4b168fe
simulator: simulate nested transaction bundles
attente Aug 13, 2025
21d7062
go get github.com/0xsequence/[email protected] && go mod tidy
attente Aug 14, 2025
3dd12cd
contracts: release candidate 1: 3f6f8aba437d72f2de4ab8790af15b7bc696e825
attente Aug 14, 2025
5b2699d
estimator with preconditions (#287)
attente Aug 26, 2025
54833e3
contracts: release candidate 2: wallet-contracts-v3@a43da236ec7827be9…
attente Aug 27, 2025
0d6bf5b
simulator: SimulateV2 and SimulateV3
attente Aug 30, 2025
d313804
relayer.gen.go
attente Sep 3, 2025
6d9af20
SendMetaTxn: nil preconditions
attente Sep 3, 2025
ae9a59d
Remove unused lib/forge-std git submodule
VojtechVitek Sep 4, 2025
e3ac93a
Relayer.Simulate: SignedTransactions -> wallet address and unsigned t…
attente Sep 5, 2025
f33933f
RelayerSimulateResult -> SimulateResult
attente Sep 5, 2025
1a98553
rm simulator.go
attente Sep 5, 2025
23a9adb
rm EstimateGasLimits
attente Sep 5, 2025
bc2c3b7
panic fix
attente Sep 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
agents:
queue: normal
steps:
- label: ":foundry: Test Sequence V3 with Go RPC Server"
key: "test-v3-rpc"
commands:
- |
# Check if GITHUB_SSH_KEY is set
if [ -z "$GITHUB_SSH_KEY" ]; then
echo "Error: GITHUB_SSH_KEY is not set"
exit 1
fi

# Install required packages
apt-get update
apt-get install -y curl git ssh build-essential

# Setup SSH key
mkdir -p ~/.ssh
echo "$GITHUB_SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts

GO_VERSION="1.20"
curl -L "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -xz -C /usr/local
export PATH=$PATH:/usr/local/go/bin
go version

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
source ~/.bashrc
foundryup

# The go-sequence repository is already mounted at the current working directory
ls -la

# Clone the sequence-v3 repository
git clone [email protected]:0xsequence/sequence-v3.git

# Start the RPC server
echo "Starting Go RPC server..."
go run ./cmd/sequence/ server &

# Wait a moment for the server to start
sleep 5

# Install dependencies for sequence-v3
cd sequence-v3
forge install

# Run specific tests in the v3 module
echo "Running BaseSig.t.sol tests..."
forge test --mp test/modules/BaseSig.t.sol -vvv

echo "Running Calls.t.sol tests..."
forge test --mp test/modules/Calls.t.sol -vvv

echo "Running Payload.t.sol tests..."
forge test --mp test/modules/Payload.t.sol -vvv

echo "Running Stage1Module.t.sol tests..."
forge test --mp test/Stage1Module.t.sol -vvv

# Cleanup SSH key
rm -f ~/.ssh/id_rsa
plugins:
- docker#v5.3.0:
image: "ubuntu:22.04"
environment:
- "GITHUB_SSH_KEY"
- "FOUNDRY_PROFILE=default"
- "GO_VERSION=1.20"
workdir: "/workdir/go-sequence"
volumes:
- ".:/workdir/go-sequence"
39 changes: 38 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,44 @@ jobs:
if: ${{ steps.pnpm-cache.outputs.cache-hit != 'true' }}

- name: Boot testchain
run: make start-testchain-verbose &
run: make start-testchain-geth-verbose &

- name: Wait for testchain to initialize
run: |
echo "Waiting for testchain to initialize..."
sleep 15
curl -s http://localhost:8545 -H"Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' || (echo "Testchain not ready"; exit 1)
echo "Testchain is ready"

- name: Test
run: make test

v3-workflow:
name: Workflow for V3
runs-on: ubuntu-latest

steps:
- name: Get Commit SHA
run: echo "COMMIT_SHA=${{ github.event.pull_request.head.sha }}"
- name: Trigger Private Workflow
uses: actions/github-script@v6
# TODO: remove this once the private workflow is fixed
continue-on-error: true
with:
script: |
const { owner, repo } = context;
const privateOwner = '0xsequence';
const privateRepo = 'sequence-v3';
const workflowId = 13719302078;
const token = ${{ secrets.GITHUB_TOKEN }};
const octokit = new Octokit({ auth: token });
await octokit.rest.repos.createDispatchEvent({
owner: privateOwner,
repo: privateRepo,
workflow_id: workflowId,
ref: 'main',
inputs: {
sdk_type: 'go',
commit_hash: process.env.COMMIT_SHA
}
});
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
node_modules

intents/intent.gen.ts

sequence-server

.claude
26 changes: 18 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,30 @@ test: wait-on-chain check-testchain-running go-test
go-test:
go clean -testcache && go test $(TEST_FLAGS) -run=$(TEST) ./...

clean:
@go clean -testcache

.PHONY: mock
mock:
go generate ./mock

test-concurrently:
cd ./testutil/chain && pnpm test


#
# Testchain
#
start-testchain:
cd ./testutil/chain && pnpm start:geth
cd ./testutil/chain && pnpm start:hardhat

start-testchain-verbose:
cd ./testutil/chain && pnpm start:hardhat:verbose

start-testchain-geth:
cd ./testutil/chain && pnpm start:geth

start-testchain-geth-verbose:
cd ./testutil/chain && pnpm start:geth:verbose

start-testchain-anvil:
Expand All @@ -29,16 +46,9 @@ start-testchain-anvil:
start-testchain-anvil-verbose:
cd ./testutil/chain && pnpm start:anvil:verbose

clean:
@go clean -testcache

check-testchain-running:
@curl http://localhost:8545 -H"Content-type: application/json" -X POST -d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' --write-out '%{http_code}' --silent --output /dev/null | grep 200 > /dev/null \
|| { echo "*****"; echo "Oops! testchain is not running. Please run 'make start-testchain' in another terminal or use 'test-concurrently'."; echo "*****"; exit 1; }

wait-on-chain:
cd ./testutil/chain && pnpm wait:server

.PHONY: mock
mock:
go generate ./mock
13 changes: 12 additions & 1 deletion auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/0xsequence/go-sequence/core"
v1 "github.com/0xsequence/go-sequence/core/v1"
v2 "github.com/0xsequence/go-sequence/core/v2"
v3 "github.com/0xsequence/go-sequence/core/v3"
"github.com/0xsequence/go-sequence/eip6492"
"github.com/goware/logger"
)
Expand Down Expand Up @@ -164,6 +165,10 @@ func V2ValidateSequenceAccountProofWith(walletContext WalletContext) ethauth.Val
return GenericValidateSequenceAccountProofWith[*v2.WalletConfig](walletContext)
}

func V3ValidateSequenceAccountProofWith(walletContext WalletContext) ethauth.ValidatorFunc {
return GenericValidateSequenceAccountProofWith[*v3.WalletConfig](walletContext)
}

func ValidateSequenceAccountProofWith(walletContext WalletContext) ethauth.ValidatorFunc {
return V2ValidateSequenceAccountProofWith(walletContext)
}
Expand All @@ -172,6 +177,7 @@ func GeneralValidateSequenceAccountProofWith(walletContexts WalletContexts) etha
return func(ctx context.Context, provider *ethrpc.Provider, chainID *big.Int, proof *ethauth.Proof) (bool, string, error) {
validatorFuncV1 := GenericValidateSequenceAccountProofWith[*v1.WalletConfig](walletContexts[1])
validatorFuncV2 := GenericValidateSequenceAccountProofWith[*v2.WalletConfig](walletContexts[2])
validatorFuncV3 := GenericValidateSequenceAccountProofWith[*v3.WalletConfig](walletContexts[3])

valid1, address1, err1 := validatorFuncV2(ctx, provider, chainID, proof)
if valid1 && err1 == nil {
Expand All @@ -183,6 +189,11 @@ func GeneralValidateSequenceAccountProofWith(walletContexts WalletContexts) etha
return valid2, address2, nil
}

return false, "", fmt.Errorf("ValidateSequenceAccountProof failed. %v, %v", err1, err2)
valid3, address3, err3 := validatorFuncV3(ctx, provider, chainID, proof)
if valid3 && err3 == nil {
return valid3, address3, nil
}

return false, "", fmt.Errorf("ValidateSequenceAccountProof failed. %v, %v, %v", err1, err2, err3)
}
}
69 changes: 69 additions & 0 deletions cmd/sequence/address.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package main

import (
"fmt"

"github.com/0xsequence/ethkit/go-ethereum/common"
"github.com/0xsequence/ethkit/go-ethereum/common/hexutil"
"github.com/0xsequence/go-sequence"
"github.com/0xsequence/go-sequence/contracts"
"github.com/0xsequence/go-sequence/core"
"github.com/spf13/cobra"
)

func calculateAddress(params *AddressCalculateParams) (string, error) {
imageHash := core.ImageHash{Hash: common.HexToHash(params.ImageHash)}
factory := common.HexToAddress(params.Factory)
module := common.HexToAddress(params.Module)

creationCode := params.CreationCode
if creationCode == "" {
creationCode = hexutil.Encode(contracts.V3.CreationCode)
}

address, err := sequence.AddressFromImageHash(imageHash, sequence.WalletContext{
FactoryAddress: factory,
MainModuleAddress: module,
CreationCode: creationCode,
})
if err != nil {
return "", fmt.Errorf("failed to calculate address: %w", err)
}

return address.Hex(), nil
}

func newAddressCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "address",
Short: "Address utilities",
}

var params AddressCalculateParams

calculateCmd := &cobra.Command{
Use: "calculate",
Short: "Calculate counterfactual address",
RunE: func(cmd *cobra.Command, args []string) error {
address, err := calculateAddress(&params)
if err != nil {
return err
}
fmt.Println(address)
return nil
},
}

calculateCmd.Flags().StringVar(&params.ImageHash, "image-hash", "", "Image hash")
calculateCmd.Flags().StringVar(&params.Factory, "factory", "", "Factory address")
calculateCmd.Flags().StringVar(&params.Module, "module", "", "Module address")
calculateCmd.Flags().StringVar(&params.CreationCode, "creation-code", "", "Creation code (optional)")

calculateCmd.MarkFlagRequired("image-hash")
calculateCmd.MarkFlagRequired("factory")
calculateCmd.MarkFlagRequired("module")

cmd.AddCommand(calculateCmd)

return cmd
}
Loading
Loading